﻿CREATE TABLE [dbo].[tblReportMenu] (
    [MenuID]          INT           IDENTITY (1, 1) NOT NULL,
    [ParentID]        INT           NOT NULL,
    [DisplayParentID] INT           NULL,
    [Text]            VARCHAR (250) NOT NULL,
    [ReportID]        INT           NULL,
    [Level]           INT           NULL,
    [Active]          BIT           NOT NULL,
    [URL]             VARCHAR (250) NULL
);
GO
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Unique id', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblReportMenu',
	@level2type = N'COLUMN', @level2name = N'MenuID';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The parent id of the menu item', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblReportMenu',
	@level2type = N'COLUMN', @level2name = N'ParentID';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The parent id of the menu item to display in the tree structure', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblReportMenu',
	@level2type = N'COLUMN', @level2name = N'DisplayParentID';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The description of the menu item', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblReportMenu',
	@level2type = N'COLUMN', @level2name = N'Text';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The report id', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblReportMenu',
	@level2type = N'COLUMN', @level2name = N'ReportID';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The level of the menu in the tree structure', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblReportMenu',
	@level2type = N'COLUMN', @level2name = N'Level';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Set to 1 if the menu item is active', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblReportMenu',
	@level2type = N'COLUMN', @level2name = N'Active';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'URL for the page', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblReportMenu',
	@level2type = N'COLUMN', @level2name = N'URL';

